/**
 * 消息 (需要jquery支持)
 */
var Message = {

    /* 消息动作元素 */
    Id: '#message_block',

    /**
     * 调用消息
     */
    Show: function(info, type, focus, id)
    {
        id = id ? id : this.Id ;

        /* 初始化消息类型 */
        switch(type)
        {
            case "success":
                var re = '<div class="notification success grid_5"> '+info+' </div>';
                break;
            case "error":
                var re = '<div class="notification error grid_5"> '+info+' </div>';
                break;
            case "warning":
                var re = '<div class="notification warning grid_5"> '+info+' </div>';
                break;
            case "info":
                var re = '<div class="notification info grid_5"> '+info+' </div>';
                break;
            case "tip":
                var re = '<div class="notification tip grid_5"> '+info+' </div>';
                break;
        }
        $(id).show();
        $(id).html(re);
        $(focus).focus().val($(focus).val());
        return false;
    },
    
    /**
     * 隐藏消息
     */
    Hide: function(id)
    {
        id = id ? id : this.Id ;
        $(id).hide();
        return false;
    }

};
